﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="user_report.aspx.cs" Inherits="AnyOffice.general.report.info.user_report" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
	<head>
		<title></title>
		
		<link rel="stylesheet" type="text/css" href="/module/date_selector/popcalendar.css"/>
		<script type="text/javascript" src="/module/date_selector/popcalendar.js"></script>
		<script type="text/javascript" src="/aspnet_client/core/function.js"></script>
	<script type="text/javascript" language="javascript">
function open_week(report_id)
{
// URL="read_week.aspx?report_id="+report_id;
// myleft=(screen.availWidth-500)/2;
// mytop=150
// mywidth=600;
// myheight=500;
// window.open(URL,"read_report","height="+myheight+",width="+mywidth+",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");


 var mwidth = "600";
 var mheight = "450";
 var loc_x = parseInt((window.screen.width - mwidth) / 2);
 var loc_y = parseInt((window.screen.height - mwidth) / 2);

 var _oParameter = new Object();
 _oParameter.dialogTitle = "月季年汇度查询";
 _oParameter.openFile = "read_week.aspx?report_id=" + report_id + "&num=" + Math.random();

 window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');
  
    



}

function open_month(report_id)
{
// URL="read_month.aspx?report_id="+report_id;
// myleft=(screen.availWidth-500)/2;
// mytop=150
// mywidth=600;
// myheight=500;
// window.open(URL,"read_report","height="+myheight+",width="+mywidth+",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");

 var mwidth = "600";
 var mheight = "450";
 var loc_x = parseInt((window.screen.width - mwidth) / 2);
 var loc_y = parseInt((window.screen.height - mwidth) / 2);

 var _oParameter = new Object();
 _oParameter.dialogTitle = "月季年汇度查询";
 _oParameter.openFile = "read_month.aspx?report_id=" + report_id + "&num=" + Math.random();

 window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');
  
    





}

function open_year(report_id) {
//    URL = "read_year.aspx?report_id=" + report_id;
//    myleft = (screen.availWidth - 500) / 2;
//    mytop = 150
//    mywidth = 600;
//    myheight = 500;
//    window.open(URL, "read_report", "height=" + myheight + ",width=" + mywidth + ",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=" + mytop + ",left=" + myleft + ",resizable=yes");


    var mwidth = "600";
    var mheight = "450";
    var loc_x = parseInt((window.screen.width - mwidth) / 2);
    var loc_y = parseInt((window.screen.height - mwidth) / 2);

    var _oParameter = new Object();
    _oParameter.dialogTitle = "月季年汇度查询";
    _oParameter.openFile = "read_year.aspx?report_id=" + report_id + "&num=" + Math.random();

    window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');
  
    



}


function CheckForm()
{
	if(document.Form1.txtBeginDate.value == "")
   {
	 alert("起始日期不能为空！");
	 document.Form1.txtBeginDate.focus();
	 return (false);
   }
   
   if(!checkIsDate(document.Form1.txtBeginDate.value))
   {
	 alert("起始日期不正确！");
	 document.Form1.txtBeginDate.focus();
	 return (false);
   }
   
   if(document.Form1.txtEndDate.value == "")
   {
	 alert("截止日期不能为空！");
	 document.Form1.txtEndDate.focus();
	 return (false);
   }
   
   if(!checkIsDate(document.Form1.txtEndDate.value))
   {
	 alert("截止日期不正确！");
	 document.Form1.txtEndDate.focus();
	 return (false);
   }
   
   return true;
}
		</script>
	</HEAD>
	<body class="bodycolor" topmargin="5">
		<form id="Form1" method="post" runat="server"><br>
			<div align="center" class="Big1">
				<b>[<asp:Literal id="litUserName" runat="server"></asp:Literal>
					- 月季年汇度查询]</b>
			</div>
			<asp:Panel id="pnlDiary" runat="server">				
				<TABLE class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
					<TR>
						<TD class="Big"><IMG height="18" src="/images/menu/diary.gif" width="18" align="absMiddle"><SPAN class="big3">
								最近的10篇</SPAN>
						</TD>
					</TR>
				</TABLE>
				
				<asp:Repeater id="rptReport" runat="server">
					<HeaderTemplate>
						<table width="100%" cellSpacing="0" cellPadding="0" border="0" class="tab_pub" align="center">
							<tr class="TableHeader">
								<td nowrap align="center" width="30%">标题</td>
								<td nowrap align="center">类型</td>
								<td nowrap align="center">汇报人</td>
								<td nowrap align="center">汇报时间</td>								
								<td nowrap align="center">操作</td>
							</tr>
					</HeaderTemplate>
					<ItemTemplate>
						<tr class="TableLine1">
							<td>
								<a href="javascript:<%#getJsNameByTypeID(Eval("Type").ToString())%>('<%#Eval("ReportId")%>');"><%#Eval("Title")%></a>
							</td>
							<td nowrap align="center"><%#getTypeNameByTypeID(Eval("Type").ToString())%></td>
							<td nowrap align="center"><u title="部门：<%#Eval("DeptName")%>" style="CURSOR:hand"><%#Eval("UserName")%></u></td>
							<td nowrap align="center"><%#Convert.ToDateTime(Eval("ReportTime").ToString()).ToString("yyyy-MM-dd")%></td>
							<td nowrap align="center">
								<a href="javascript:<%#Convert.ToInt32(Eval("Type")) == 1 ? "open_week" : "open_month"%>('<%#Eval("ReportId")%>');">点评</a>
							</td>						
						</tr>
					</ItemTemplate>	
					<AlternatingItemTemplate>
					<tr class="TableLine2">
							<td>
								<a href="javascript:<%#getJsNameByTypeID(Eval("Type").ToString())%>('<%#Eval("ReportId")%>');"><%#Eval("Title")%></a>
							</td>
							<td nowrap align="center"><%#getTypeNameByTypeID(Eval("Type").ToString())%></td>
							<td nowrap align="center"><u title="部门：<%#Eval("DeptName")%>" style="CURSOR:hand"><%#Eval("UserName")%></u></td>
							<td nowrap align="center"><%#Convert.ToDateTime(Eval("ReportTime").ToString()).ToString("yyyy-MM-dd")%></td>
							<td nowrap align="center">
								<a href="javascript:<%#Convert.ToInt32(Eval("Type")) == 1 ? "open_week" : "open_month"%>('<%#Eval("ReportId")%>');">点评</a>
							</td>						
						</tr>
					</AlternatingItemTemplate>				
					<FooterTemplate>
						</table>
					</FooterTemplate>
				</asp:Repeater>
				<asp:Literal id="litReport" runat="server"></asp:Literal>				
			</asp:Panel>
			
			<asp:Panel id="pnlMain" runat="server" Visible="False">
			<BR>
				<TABLE height="3" cellSpacing="0" cellPadding="0" width="95%" border="0">
					<TR>
						<TD width="100%" background="/images/dian1.gif"></TD>
					</TR>
				</TABLE>
			<TABLE class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<TR>
					<TD class="Big"><IMG height="18" src="/images/menu/diary.gif" align="absMiddle"><SPAN class="big3">&nbsp;周报月报查询</SPAN></TD>
				</TR>
			</TABLE>
				<TABLE width="500" cellSpacing="0" cellPadding="0" border="0" class="tab_pub" align="center">
					<TR>
						<TD class="TableData" noWrap>起始日期：</TD>
						<TD class="ta_txt"><INPUT class="BigInput" id="txtBeginDate" type="text" maxLength="10" size="10" name="txtBeginDate"
								runat="server"> <IMG style="CURSOR: hand" onClick="popUpCalendar(this,txtBeginDate,'yyyy-mm-dd','');"
								src="/module/date_selector/calendar.gif" align="absMiddle" border="0">
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>截止日期：</TD>
						<TD class="ta_txt"><INPUT class="BigInput" id="txtEndDate" type="text" maxLength="10" size="10" name="txtEndDate"
								runat="server"> <IMG style="CURSOR: hand" onClick="popUpCalendar(this,txtEndDate,'yyyy-mm-dd','');" src="/module/date_selector/calendar.gif"
								align="absMiddle" border="0">
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>关键词：</TD>
						<TD class="ta_txt"><INPUT class="BigInput" id="txtKey" type="text" maxLength="50" size="20" name="txtKey"
								runat="server"></TD>
					</TR>
					<TR>
						<TD class="bnt_con" noWrap align="center" colSpan="2"><INPUT class="bnt01" title="进行查询" onClick="return CheckForm();" type="submit" value="查 询"
								name="button">
						</TD>
					</TR>
				</TABLE>
			</asp:Panel>
			<asp:Panel id="pnlResult" runat="server" Visible="False">
			<TABLE class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<TR>
					<TD class="Big"><IMG height="18" src="/images/menu/diary.gif" width="18" align="absMiddle"><SPAN class="big3"> 周报月报查询结果</SPAN></TD>
				</TR>
			</TABLE>
			
				<asp:Repeater id="rptQuery" runat="server" EnableViewState="False">
					<HeaderTemplate>
						<table width="100%" cellSpacing="0" cellPadding="0" border="0" class="tab_pub" align="center">
							<tr class="TableHeader">
								<td nowrap align="center" width="30%">标题</td>
								<td nowrap align="center">类型</td>
								<td nowrap align="center">申请人</td>
								<td nowrap align="center">填写时间</td>								
								<td nowrap align="center">操作</td>
							</tr>
					</HeaderTemplate>
					<ItemTemplate>
						<tr class="TableLine1">
							<td>
								<a href="javascript:<%#Convert.ToInt32(Eval("Type")) == 1 ? "open_week" : "open_month"%>('<%#Eval("ReportId")%>');"><%#Eval("Title")%></a>
							</td>
							<td nowrap align="center"><%#getTypeNameByTypeID(Eval("Type").ToString())%></td>
							<td nowrap align="center"><u title="部门：<%#Eval("DeptName")%>" style="CURSOR:hand"><%#Eval("UserName")%></u></td>
							<td nowrap align="center"><%#Convert.ToDateTime(Eval("ReportTime").ToString()).ToString("yyyy-MM-dd")%></td>
							<td nowrap align="center">
								<a href="javascript:<%#Convert.ToInt32(Eval("Type")) == 1 ? "open_week" : "open_month"%>('<%#Eval("ReportId")%>');">点评</a>
							</td>						
						</tr>
					</ItemTemplate>	
					<AlternatingItemTemplate>
					<tr class="TableLine2">
							<td>
								<a href="javascript:<%#Convert.ToInt32(Eval("Type")) == 1 ? "open_week" : "open_month"%>('<%#Eval("ReportId")%>');"><%#Eval("Title")%></a>
							</td>
							<td nowrap align="center"><%#getTypeNameByTypeID(Eval("Type").ToString())%></td>
							<td nowrap align="center"><u title="部门：<%#Eval("DeptName")%>" style="CURSOR:hand"><%#Eval("UserName")%></u></td>
							<td nowrap align="center"><%#Convert.ToDateTime(Eval("ReportTime").ToString()).ToString("yyyy-MM-dd")%></td>
							<td nowrap align="center">
								<a href="javascript:<%#Convert.ToInt32(Eval("Type")) == 1 ? "open_week" : "open_month"%>('<%#Eval("ReportId")%>');">点评</a>
							</td>						
						</tr>
					</AlternatingItemTemplate>
					<FooterTemplate>
						</table>
					</FooterTemplate>
				</asp:Repeater>
				<asp:Literal id="litMessage" runat="server"></asp:Literal>
				<BR>
				<DIV align="center"><INPUT class="BigButton" onClick="location='user_report.aspx?user_id=<% = ViewState["UserId"]%>';" type="button" value="返回">
				</DIV>
			</asp:Panel>			
		</form>
	</body>
</html>

